package com.itheima.extendsconstructor;

public class Test2 {

    public static void main(String[] args) {

        //this(...)调用兄弟构造器
        /*Student s1 = new Student("张三", 18, "男");
        System.out.println(s1);
        Student s2 = new Student("李四", 20, "男");
        System.out.println(s2);*/

        Student s1 = new Student("张三", 18);
        System.out.println(s1);
        Student s2 = new Student("李四", 20);
        System.out.println(s2);

        Student s3 = new Student("王五", 20, "女");
        System.out.println(s3);


    }
}
